// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>MyCompany.MyProject</Solution>
// <Project>MyCompany.MyProject.Application</Project>
// <FileName>OrderOutDto.cs</FileName>
// <CreateTime>2017-04-23 23:16</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-23 23:16" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System;
using Abp.Application.Services.Dto;
using Vecen.BangChuang.Helpers;

namespace Vecen.BangChuang.BangChuang.Mall.Dtos {
    /// <summary>
    /// 订单结构
    /// </summary>
    public class OrderListOutDto: EntityDto {

        /// <summary>
        /// 商品缩略图
        /// </summary>
        public int? HeaderImageId { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 是否已支付
        /// </summary>
        public bool IsPayed { get; set; }

        /// <summary>
        /// 是否已发货
        /// </summary>
        public bool IsDelivered { get; set; }

        /// <summary>
        /// 订单价格
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 订单时间
        /// </summary>
        public DateTime OrderTime { get; set; }

        /// <summary>
        /// 是否已作废
        /// </summary>
        public bool IsBlankOut { get; set; }

        /// <summary>
        /// 到期时间
        /// </summary>
        public DateTime ExpiryTime => OrderTime.AddHours(24);

        /// <summary>
        /// 到期时间
        /// </summary>
        public string ExpiryTimeStr => ExpiryTime.FromNow();
    }
}